/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package kontrabota1;

import java.util.Scanner;

/**
 *
 * @author Student
 */
public class Kontrabota1 {
 
        
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
      int value = 0;
      int positive = 0;
      int negative = 0;
      System.out.println("Enter number using ',' ");
      Scanner reader = new Scanner(System.in);
      String line = reader.nextLine();
       Scanner lineScanner = new Scanner(line);
      lineScanner.useDelimiter(",");
      while (lineScanner.hasNext()) {
        String part = lineScanner.next();
        if (Integer.parseInt(part) > 0 )
        {
            positive++;
        }
         if (Integer.parseInt(part) < 0 )
        {
            negative++;
        }
        System.out.print(part + " ");
      }
      System.out.println("\n Количество положительных чисел: "+positive);
     System.out.println("Количество отрицательных чисел: "+negative);
    }
    
}
